const UserService = require('../service/users')
class UserController {
  async add(ctx) {
    let data = await UserService.add(ctx)
    ctx.body = data;
  }
  async delete(ctx) {
    let data = await UserService.delete(ctx)
    ctx.body = data;
  }
  async batchDelete(ctx) {
    // batchDelete
    let data = await UserService.batchDelete(ctx)
    ctx.body = data;
  }
  async page(ctx) {
    let data = await UserService.page(ctx)
    console.log(data, 'data---data')
    ctx.body = data;
  }
  async update(ctx) {
    let data = await UserService.update(ctx)
    ctx.body = data;
  }
  async search(ctx) {
    let data = await UserService.search(ctx)
    ctx.body = data;
  }
}

module.exports = new UserController